﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.models {
    import net.wooga.pets.models.world.vos.*;
    import org.robotlegs.mvcs.*;

    public class LevelModel extends Actor {

        private var _levels:Array;

        public function LevelModel(){
            this._levels = [];
            super();
        }
        public function addLevel(_arg1:LevelVO):void{
            this._levels.push(_arg1);
        }
        public function getLevelDataByNumber(_arg1:int):LevelVO{
            return (this._levels[(_arg1 - 1)]);
        }
        public function getNextLevelWithNewSlot(_arg1:int):LevelVO{
            var _local2:LevelVO;
            var _local3:int = _arg1;
            while (_local3 < this._levels.length) {
                _local2 = this._levels[_local3];
                if (_local2.slots >= 1){
                    return (_local2);
                };
                _local3++;
            };
            l(("i no upcoming level with new slot found. current level: " + _arg1));
            return (null);
        }
        public function getLevelOfRoomType(_arg1:String):int{
            var _local2:LevelVO;
            for each (_local2 in this._levels) {
                if (_local2.room == _arg1){
                    return (_local2.level);
                };
            };
            return (-1);
        }
        public function getLevelOfPetType(_arg1:String):int{
            return (-1);
        }

    }
}//package net.wooga.pets.models 
